package com.dime.basic.api;

import com.dime.basic.api.domain.DimeBaseharm;
import com.dime.basic.api.factory.RemoteBaseCombFallbackFactory;
import com.dime.basic.api.model.*;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@FeignClient(contextId = "remoteOccupationalBasicService", value = ServiceNameConstants.DM_BASIC, fallbackFactory = RemoteBaseCombFallbackFactory.class)
public interface RemoteOccupationalBasicService {
    @GetMapping("/occupationalbasic/getoccupationalbasic")
    public R<OccupationalBasic> occupationalBasic(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/occupationalbasic/info/getHarmDiseaseCriterions")
    public R<HarmDiseaseCriterion> harmDiseaseCriterions(@RequestBody HarmWorkStatus hws, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/occupationalbasic/info/getHarmContraCriterions")
    public R<HarmContraCriterion> harmContraCriterions(@RequestBody HarmWorkStatus hws, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/occupationalbasic/info/harmDiseaseCriterionsByList")
    public R<List<HarmDiseaseCriterion>> harmDiseaseCriterionsByList(@RequestBody ArrayList<HarmWorkStatus> hws, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/occupationalbasic/info/harmContraCriterionsByList")
    public R<List<HarmContraCriterion>> harmContraCriterionsByList(@RequestBody ArrayList<HarmWorkStatus> hws, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
